﻿
//

//


using EMSNet.Core;
using System.ComponentModel.DataAnnotations;

namespace EMSNet.Service;

/// <summary>
/// 基础配置基础输入参数
/// </summary>
public class EmsBaseconfigBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>
    public virtual long? Category { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>
    public virtual string? name { get; set; }
    
    /// <summary>
    /// 数值格式
    /// </summary>
    public virtual string? DataValueFormat { get; set; }
    
    /// <summary>
    /// 折标系数格式
    /// </summary>
    public virtual string? ToleranceFormat { get; set; }
    
    /// <summary>
    /// 数值单位
    /// </summary>
    public virtual string? DataValueMeter { get; set; }
    
    /// <summary>
    /// 折合系数单位
    /// </summary>
    public virtual string? ToleranceMater { get; set; }
    
}

/// <summary>
/// 基础配置分页查询输入参数
/// </summary>
public class PageEmsBaseconfigInput : BasePageInput
{
    /// <summary>
    /// 类型
    /// </summary>
    public string? Category { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>
    public string? name { get; set; }
    
    /// <summary>
    /// 数值格式
    /// </summary>
    public string? DataValueFormat { get; set; }
    
    /// <summary>
    /// 折标系数格式
    /// </summary>
    public string? ToleranceFormat { get; set; }
    
    /// <summary>
    /// 数值单位
    /// </summary>
    public string? DataValueMeter { get; set; }
    
    /// <summary>
    /// 折合系数单位
    /// </summary>
    public string? ToleranceMater { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 基础配置增加输入参数
/// </summary>
public class AddEmsBaseconfigInput
{
    /// <summary>
    /// 类型
    /// </summary>
    public long? Category { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>
    [MaxLength(100, ErrorMessage = "名称字符长度不能超过100")]
    public string? name { get; set; }
    
    /// <summary>
    /// 数值格式
    /// </summary>
    [MaxLength(100, ErrorMessage = "数值格式字符长度不能超过100")]
    public string? DataValueFormat { get; set; }
    
    /// <summary>
    /// 折标系数格式
    /// </summary>
    [MaxLength(100, ErrorMessage = "折标系数格式字符长度不能超过100")]
    public string? ToleranceFormat { get; set; }
    
    /// <summary>
    /// 数值单位
    /// </summary>
    [MaxLength(100, ErrorMessage = "数值单位字符长度不能超过100")]
    public string? DataValueMeter { get; set; }
    
    /// <summary>
    /// 折合系数单位
    /// </summary>
    [MaxLength(100, ErrorMessage = "折合系数单位字符长度不能超过100")]
    public string? ToleranceMater { get; set; }
    
}

/// <summary>
/// 基础配置删除输入参数
/// </summary>
public class DeleteEmsBaseconfigInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 基础配置更新输入参数
/// </summary>
public class UpdateEmsBaseconfigInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>    
    public long? Category { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>    
    [MaxLength(100, ErrorMessage = "名称字符长度不能超过100")]
    public string? name { get; set; }
    
    /// <summary>
    /// 数值格式
    /// </summary>    
    [MaxLength(100, ErrorMessage = "数值格式字符长度不能超过100")]
    public string? DataValueFormat { get; set; }
    
    /// <summary>
    /// 折标系数格式
    /// </summary>    
    [MaxLength(100, ErrorMessage = "折标系数格式字符长度不能超过100")]
    public string? ToleranceFormat { get; set; }
    
    /// <summary>
    /// 数值单位
    /// </summary>    
    [MaxLength(100, ErrorMessage = "数值单位字符长度不能超过100")]
    public string? DataValueMeter { get; set; }
    
    /// <summary>
    /// 折合系数单位
    /// </summary>    
    [MaxLength(100, ErrorMessage = "折合系数单位字符长度不能超过100")]
    public string? ToleranceMater { get; set; }
    
}

/// <summary>
/// 基础配置主键查询输入参数
/// </summary>
public class QueryByIdEmsBaseconfigInput : DeleteEmsBaseconfigInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataEmsBaseconfigInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 基础配置数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportEmsBaseconfigInput : BaseImportInput
{
    /// <summary>
    /// 类型 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Category { get; set; }
    
    /// <summary>
    /// 类型 文本
    /// </summary>
    [ImporterHeader(Name = "类型")]
    [ExporterHeader("类型", Format = "", Width = 25, IsBold = true)]
    public string CategoryFkDisplayName { get; set; }
    
    /// <summary>
    /// 名称
    /// </summary>
    [ImporterHeader(Name = "名称")]
    [ExporterHeader("名称", Format = "", Width = 25, IsBold = true)]
    public string? name { get; set; }
    
    /// <summary>
    /// 数值格式
    /// </summary>
    [ImporterHeader(Name = "数值格式")]
    [ExporterHeader("数值格式", Format = "", Width = 25, IsBold = true)]
    public string? DataValueFormat { get; set; }
    
    /// <summary>
    /// 折标系数格式
    /// </summary>
    [ImporterHeader(Name = "折标系数格式")]
    [ExporterHeader("折标系数格式", Format = "", Width = 25, IsBold = true)]
    public string? ToleranceFormat { get; set; }
    
    /// <summary>
    /// 数值单位
    /// </summary>
    [ImporterHeader(Name = "数值单位")]
    [ExporterHeader("数值单位", Format = "", Width = 25, IsBold = true)]
    public string? DataValueMeter { get; set; }
    
    /// <summary>
    /// 折合系数单位
    /// </summary>
    [ImporterHeader(Name = "折合系数单位")]
    [ExporterHeader("折合系数单位", Format = "", Width = 25, IsBold = true)]
    public string? ToleranceMater { get; set; }
    
}
